package com.neusoft.proxy.two;

public class TestProxy {
    public static void proxy_one() {
        SuperMarketAction superMarket = new SuperMarket(); //被代理对象
        SuperMarketInvocationHandler invocationHandler = new SuperMarketInvocationHandler(superMarket);
        SuperMarketAction superMarketAction = (SuperMarketAction) invocationHandler.createProxy();
        superMarketAction.deliverGoods();
        superMarketAction.test();
    }

    public static void main(String[] args) {
        proxy_one();
    }
}
